global stock, foundation, equal, currentsel, getlist, godlist, basecard, leftlist, rightlist
on beginSprite me
if listp(foundation) = 0 then
foundation = [:]
end if
row = determinerow()
foundation.addProp(row, new(script("card pile")))
end
on determinerow me
if spriteNum = 115 then
return #fone
else
if spriteNum = 116 then
return #ftwo
else
if spriteNum = 117 then
return #fthree
else
if spriteNum = 118 then
return #ffour
end if
end if
end if
end if
end
on mouseEnter me
if getlist <> VOID then
if foundation[row].getcardcount() = 0 then
if getlist.getlastcard().rank = "ace" then
equal = 1
currentsel = spriteNum - 4
godlist = foundation[row]
end if
else
if foundation[row].getcardcount() > 0 then
if (getlist.getlastcard().rankvalue = (foundation[row].getlastcard().rankvalue + 1)) and (getlist.getlastcard().suit = foundation[row].getlastcard().suit) then